package cn.ryh.consulorder.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @ClassName PaymentController
 * @Description TODO
 * @Author RaoYH
 * @CreateDate 2020/11/20
 * @UpdateUser RaoYH
 * @UpdateDate 2020/11/20
 * @UpdateRemark TODO
 * @Version 1.0
 */
@RestController
@RequestMapping(value = "/consumer/payment")
public class OrderController {
    private static final Logger log = LoggerFactory.getLogger(OrderController.class);
    private final static String INVOKE_URL = "http://cloud-zookeeper-payment-service";
    @Resource
    private RestTemplate restTemplate;
    @RequestMapping(value = "/zk")
    public String paymentZk() {
        return restTemplate.getForObject(INVOKE_URL + "/payment/zk", String.class);
    }
}
